Cannot load report while designer is being shown in a control

In form's constructor, after InitizalizeComponent(), this code displays the designer on the form being created:
  public partial class Form1 : Form
  {
    public Form1()
    {
      InitializeComponent();
      report.Designer = new Designer(report);
      report.Designer.ShowInPanel(this);
    }

    public void LoadReport(string filename)
    {
      report.Load(filename);
    }
  }
then form's LoadReport method is called after the form's creation and, while report.Load(filename) is being excuted, some random named object (thx to obfuscation) causes null reference exception. Any ideas?

Comments

  • edited 7:35PM
    You need to load the report first, then design it. Designer cannot know if you change your report from outside.
  • edited 7:35PM
    We have developed an addin for Visual Studio 2005/2008, and we use fastreport VCL designer as a designer in Visual Studio. It's done with wrapping the report designer inside an ActiveX class. In VCL, its possible to load a report while the designer is open.
          FfrxReport.Designer.Lock;
          FfrxReport.LoadFromStream(ReportStream);
          FfrxReport.Designer.ReloadReport;
    
    tried designer.Lock() and Unlock() in fr.net but didnt work >
  • edited 7:35PM
    Sorry, but your request is very uncommon. FR.Net designer cannot do that now.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.